package com.viphome.dao;

import com.viphome.bean.Seckill;

import java.util.Date;
import java.util.List;

/**
 * Created by wangzhanjin on 2017/12/26.
 */
public interface SeckillDao {

    /**
     * 减库存
     * @param seckillId
     * @param killTime
     * @return如果影响行数>1,表示更新行数
     */
    int redeuceNumber(long seckillId, Date killTime);

    /**
     * 根据id
     * @param seckillId
     * @return
     */
    Seckill queryById(long seckillId);


    List<Seckill> queryAll(int offet, int limit);
}
